home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Communications / General / LineShare Folder / Put Onto Productions Disks / Docs / Script Docs < prev    next >
Text File  |  1994-04-06  |  8KB  |  134 lines

  1. LineShare 1.3
  2. –––––––––––––––––––––––––––
  3. • The Note and LogMSG operators can have the second parameter (like in ARA): if the value is 2 or 3, the message is shown in the LineShare panel, if the value is 1 or 3, the message is written into the LineShare Log.
  4.  
  5.  
  6. LineShare 1.5
  7. –––––––––––––––––––––––––––
  8. • All comment lines started with "!$" are shown in the  "Comment" field when the script is selected in the "Attach" dialog box.
  9.  
  10. • The parameters should be defined in the script (the previous versions had the ^2,^3 and ^4 built-in parameters only). A parameter is described with a script line starting with the parameter identifier:
  11. ^n <parameter name> = <parameter type> <parameter values> <default value>
  12.  
  13. where:
  14. n    - defines the parameter ID, should a digit (from 2 to 9, the ^1 is reserved for the dialing string).
  15.  
  16. <parameter name> - the title string to be shown in the Options dialog box;
  17.  
  18. <parameter type>  - one of: TEXT, BOOL, ENUM
  19. a TEXT parameter is shown as a text field in the Options dialog box. A user can assign any string value to such a parameter;
  20. a BOOL parameters is shown as a pair of radio buttons in the Options dialog box.
  21. a ENUM parameters is shown as a pop-up menu in the Options dialog box. 
  22.  
  23. <parameter values>- a list of valid parameter values:
  24. this list contains elements separated with commas and enclosed with parenthesis; each element consists of two strings separated with the equal sign:
  25. Sample: ("Never"="0","1 Ring"="1","2 Rings"="2")
  26.  
  27. for  TEXT parameters this list should be omitted;
  28. for  BOOL parameters the list should contain 2 elements, the first string in each element defines the name of the radio button, the second string is assigned to the parameter if the button is selected; if the list is ommited, the default one is used:
  29. ("On"="1","Off"="0")
  30. for ENUM parameters the list elements define pop-up menu items: the first string is used as the item text, the second string is assigned to the parameter is the item is selected.
  31.  
  32. <default value> - a string assigned to the parameter when a script is initially attached to the line.
  33.  
  34. Sample:
  35. ^5 Fax Identifier:    = Text "Stalker_GmbH"
  36. A text field titled "Fax identifier" appears is the Options dialog box. Initially the string "Stalker_GmbH" is assigned to this parameter.
  37.  
  38. ^2 Speaker On: = Enum("Never" = "0" ,  "When Connecting" = "1", "Always"="2") "1"
  39. A pop-up menu titled "Speaker On:" appears in the Options dialog box. It has three items: "Never","When Connecting", "Always". Selecting one of these items results in the value "0", "1",  or "2" is assigned to the parameter ^2. Initially "1" is assigned.
  40.  
  41. • The wildcard combination ^$ is implemented. If met in a match string (i.e. in a MatchStr operator), this combination matches any string in the input stream:
  42. i.e. if the input stream is:
  43. CONNECT 9600/V42bis
  44. and a match string is defined as:
  45. MatchStr 1 10 "CONNECT ^$/"
  46. then script will jump to the lable 10, and the "9600" is assigned to ^$
  47.  
  48. When used in other operators, ^$ can be used to access the substring it has just compared.
  49. Sample:
  50. Note "Connected at ^$bps"
  51.  
  52. • The Say command is implemented:
  53. Say <string>
  54. It brings up a Notification Alert Box with the <string> message.
  55.  
  56. • Variables:
  57. you can use several (5 in this version) variables in strings. To substitute the variable content, you should write the carret sign and the variable name - a capital letter (^A,^B,^C,^D,^E).
  58. To assign a value to a variable, use the SETVAR command:
  59. SETVAR <variable_name> <string>
  60. Sample: SetVar B "Normal"
  61.              Note "^B Connection Established"
  62. This results in the "Normal Connection Established" message.
  63.  
  64. • Calculation:
  65. Everywhere in a script, except the "@Label" lines you can use a combination:
  66. VAL(<string>) instead of a number.
  67. Sample:
  68.   SetVar A "96"
  69.   SetSpeed VAL("^A00")
  70. This results in switching the serial port speed to 9600 bps.
  71. The digits in the string can have leading and trailing spaces.
  72.  
  73. Note: it means that you can use "calculated jump" as well:
  74. i.e. Jump Val("^A") is a legal operation.
  75.  
  76. • Error codes: LineShare now shows the error code, if an error occured when executing a script.
  77. There is the list of the error codes:
  78.  -6003        Jsr/return stack overflow
  79.  -6015        Undefined label
  80.  -6016        Unknown Script Command
  81.  -6017        Unexpected End of Script File.
  82.  -6018        Illegal MatchString index
  83.  -6025        Error in syntax
  84.  -6026        Error in number
  85.  -6027        String too long
  86.  -6028        Parameter/variable is not defined
  87.  -6052        Too long string in QueueInput
  88.  
  89. LineShare 2.1
  90. –––––––––––––––––––––––––––
  91. • IfStr now works with script variables, not only parameters
  92. • Reset(2400) disconnect detector is now supported (for supporting FaxSTF Class 1 driver). The subport is disconnected if the SerReset command is sent through that port and the speed field in the SerReset call is set to 2400.
  93.  
  94. LineShare 2.2
  95. –––––––––––––––––––––––––––––
  96. • IfOpen "<port name>" <label>
  97. operator allows to check if a subport is open with an application. Jumps to 
  98. the label <label> if the port named <port name> is open.
  99.  
  100. • SetInfo <number> "string"
  101. This operator stores the "string" so it is returned by a modem emulator in response to the ATIn command, when is equal to <number>. For example, after
  102. SetInfo 9 "123-456"
  103. is executed, and an application sends the "ATI9" command through the port (attached to modem emulator), the "123-456" is sent back to the application.
  104.  
  105. • SetSReg <number> <value>
  106. Like SetInfo stores the numeric <value> into the emulator's S-reghisters. This value will be returned with the modem emulator when an application sends a "ATSn?" command, where n is equal to <number>
  107. Example: after the
  108. SetSReg 27 155
  109. has been executed, and an application sends the "ATS27?" command, the number 155 is sent back in response.
  110.  
  111. LineShare 3.0
  112. -------------------------
  113. The modem specifications files are added. They can be placed either into the "LineShare Scripts" folder or into the "Modems" folder inside the System Folder.
  114. Each file should contain one 'STR#' resource with ID number 128. That resource should contain string pairs: the first one is the option name (four capital letters), the second is the option value.
  115. To make LineShare ask for a modem specification file, include the following line into the script:
  116. ^# <title>
  117. Example:
  118. ^# Modem:
  119.  
  120. • GetOption <variable name> <option name> <label>
  121. The operator puts the value of the option <option name> (from the modem specification file) into the variable <variable name>. If no modem specification file is in use or the option is absent in the specification file, the script jumps to the label <label>
  122. Example:
  123. GetOption A "HWHS" 3
  124. It takes the HWHS string (AT command for hardware handshaking) from the modem specification file and puts that string into the variable A. If the string is not found, the script continues from the label 3.
  125.  
  126. • GetCommand <variable name> <port name> <command name>
  127. The operator takes the AT-command <command name> from the modem emulator on the port <port name> and puts this string into the variable <variable name>.
  128. The AT commands an application sends to the serial ports created with LineShare are processed with the built-in LineShare emulator, but they are stored in the emulator buffer aas well. This command can retrive those commands from the application buffer. If no such command was sent to that port, an empty string is put into the variable.
  129. Example:
  130. GetCommand A "Fax" "L"
  131. If an application working with the "Fax" port has sent a ATL4 command to the port (i.e. to the modem emulator), this operator will put the string "L4" into the variable A.
  132.  
  133. • GetSReg <variable name> <port name> <register number>
  134. The operator takes the value of the S-register <register number> from the modem emulator on the port <port name> and places the value (as the binary 1-char string) into the variable <variable name>.